<?php
namespace app\common\validate;

use think\Validate;

class Type extends Validate
{
    protected $rule =   [
        'typeid'  => 'require',
        'code'=>'require|min:4',
        'token'=>'require|min:30',
    ];

    protected $message  =   [
        'typeid.require'     => '类型id必须填写',
        'code.require' => '验证码不能为空！',
        'code' => '验证码格式错误！',
        'token.require' => 'token不能为空！',
        'token' => 'token格式错误！',
    ];

    /**
     * @var array 验证的场景
     */
    protected $scene = [
        'checkType'  =>  ['typeid'],
    ];
}
